{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# The Deep Learning Book (Simplified)\n",
    "## Part I - Applied Math and Machine Learning basics\n",
    "*This is a series of blog posts on the [Deep Learning book](http://deeplearningbook.org) where we are attempting to provide a summary of each chapter highlighting the concepts that we found to be most important so that other people can use it as a starting point for reading the chapters, while adding further explanations on few areas that we found difficult to grasp. Please refer [this](http://www.deeplearningbook.org/contents/notation.html) for more clarity on notation.*\n",
    "\n",
    "## Chapter 3: Probability and Information Theory\n",
    "Everything that we observe around us has some degree of [uncertainty](https://en.wikipedia.org/wiki/Uncertainty) to it. [Probability Theory](https://en.wikipedia.org/wiki/Probability_theory) provides a mathematical framework for representing this uncertainty. In AI applications, probability theory is used in two ways:\n",
    "\n",
    "- The law of probability specifies how an AI system should reason. For example, for those who are familiar with probability, a classification problem (e.g. given an image, classify whether the image is that of a \"cat\" or a \"dog\") can be viewed as finding $P(Y \\hspace{0.1cm} | \\hspace{0.1cm}  X)$, where $X$ is the input data and $Y$ is the label that we are predicting. We design our algorithms to compute or approximate (in case computing exact value is not feasible) various expressions derived using probability theory.\n",
    "\n",
    "- Use probability and statistics to analyze the behaviour of proposed AI systems. For example, we can analyze the accuracy of a classification model by observing how many of the predictions are correct.\n",
    "\n",
    "The sections present in this chapter are listed below. Feel free to navigate as you like: <br>\n",
    "\n",
    "**1. Why Probability?** <br>\n",
    "**2. Random Variables** <br>\n",
    "**3. Probability Distributions** <br>\n",
    "**4. Marginal Probability** <br>\n",
    "**5. Conditional Probability** <br>\n",
    "**6. The Chain Rule of Conditional Probabilities** <br>\n",
    "**7. Independence and Conditional Independence** <br>\n",
    "**8. Expectation, Variance and Covariance** <br>\n",
    "**9. Common Probability Distributions** <br>\n",
    "**10. Useful Properties of Common Functions** <br>\n",
    "**11. Bayes' Rule** <br>\n",
    "**12. Technical Details of Continuous Variables** <br>\n",
    "**13. Information Theory** <br>\n",
    "**14. Structured Probabilistic Models** <br>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1. Why Probability?\n",
    "Although Computer Scientists and Software Engineers deal mostly with entities that are entirely deterministic, Machine Learning makes heavy use of probability theory. The main reason for this being that Machine Learning must always deal with quantities which are either uncertain or [stochastic](https://en.wikipedia.org/wiki/Stochastic)  \n",
    "(non-deterministic). The possible sources of uncertainty are:\n",
    "- Inherent stochasticity in the system being modelled: For example, creating theoretical scenarios such as a hypothetical card game where we assume that the cards are truly shuffled into a random order.\n",
    "\n",
    "- Incomplete observability: When we cannot observe all the variables that drive the behaviour of a system, even deterministic systems can become stochastic, e.g. the [Monty Hall Problem](https://en.wikipedia.org/wiki/Monty_Hall_problem) where the outcome given the contestant's choice is deterministic, but from the point of view of the contestant, the outcome is uncertain.\n",
    "\n",
    "- Incomplete modelling: When we use a model that must discard some of the information that we have observed, the discarded information leads to an uncertainty in the model predictions.\n",
    "\n",
    "There are two types of kinds of probability:\n",
    "- **Frequentist Probability**: Probability theory was originally developed to analyze the frequencies of events (which are often repeatable, e.g. drawing a certain hand of cards in a poker game). When we say that an outcome has a probability p of occuring, it means that if we repeated the experiment infinte times, then proportion p of those repititions would produce that outcome. This kind of probability, rerelated directly to the rates at which events occur, is called frequentist probability.\n",
    "\n",
    "\n",
    "- **Bayesian Probability**: The above reasoning doesn't seem applicable to experiments which are not repeatable, e.g. when a doctor says that a patient has 40% chance of having the flu, the probability represents a **degree of belief**, with 1 indicating absolute certainty that the patient has the flu and 0 indicating absoluting certainty that the patient doesn't have the flu. This kind of probability, related to qualitative levels of reasoning, is called **Bayesian Probability**.\n",
    "\n",
    "However, in order to satisfy the properties that we expect common sense reasoning about uncertainty to have, we treat both Bayesian and frequentist probabilities as exactly the same. For example, the probability that a player will win a poker game given he/she has a certain set of cards is calculated in the exact same manner as the probability that a patient has a certain disease given that he/she has certain symptoms."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2. Random Variables\n",
    "A **random variable** is a variable, e.g. x, that can take on different values (states) randomly. Since it takes on values randomly, there must be a probability associated with each of those values. Thus, a random variable must be coupled with a **probability distribution** that specifies how likely each of the states are.\n",
    "\n",
    "There are two types of random variables:\n",
    "- Discrete: The number of states are finite or [countably infinite](https://en.wikipedia.org/wiki/Countable_set).\n",
    "- Continuous: It is associated with a real value.\n",
    "\n",
    "More details on these in the next section."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3. Probability Distributions\n",
    "\n",
    "A **probability distribution** is a description of how likely a random variable or a set of random variables is, to take on each of its possible states. For example, if the random variable x can take values $\\{1,2\\}$, then $Pr(\\text{x}= 1) = 0.4$ specifies the probability distribution of x, where the probability of x taking the value 1 is 0.4 and the probability of x taking the value 2 is 0.6. Probability distributions are described based on whether the random variable is discrete or continuous."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.1 Discrete Variables and Probability Mass functions\n",
    "The probability distribution over discrete random variables is described using a **probability mass function** (PMF). Along with its random variable, it is denoted as: x ~ $P(\\text{x})$. \n",
    "Note that $P(x)$ denotes $P(\\text{x} = x)$, which is the probability that x = $x$. A probability mass function acting over multiple variables is called a **joint probability distribution**. $P(\\text{x} = x, \\text{y} = y)$ denotes the probability that x = $x$ and y = $y$ simultaneously. \n",
    "\n",
    "For a function $P$ to be a PMF, it must satisfy these conditions:\n",
    "\n",
    "- The [domain](https://en.wikipedia.org/wiki/Domain_of_a_function) of P must be all possible states of x.\n",
    "- $\\forall x \\in $ x, $ 0 \\leq P(x) \\leq 1$\n",
    "- $ \\sum_{x \\in \\text{x}} P(x) = 1$ (normalization)\n",
    "\n",
    "For example, the uniform distribution on a random variable x with $k$ different states is given by: \n",
    "<br> <br>\n",
    "$$ P(\\text{x} - x_i) = 1/k $$\n",
    "\n",
    "To arrive at this, let we use the normalization condition:\n",
    "\n",
    "$$ \\sum_{i = 1}^{k} P(x_i) = 1 $$\n",
    "\n",
    "In a uniform distribution, all the states have the same probability (say p). Thus, we get:\n",
    "$$ kp = 1 $$\n",
    "$$ \\Rightarrow p = 1/k $$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhIAAAFkCAYAAAB1rtL+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAH4FJREFUeJzt3XuQnXWd5/H3VwjXkbBOJgRkZgQCCOuCdINMarwgqBlx\nxXHUwQaLnaWGEsWRbdeFFS/M4iAjLgRRU4WXGRLRnkIcEUsgIzhmlOvQDVnBAAHDJVxiSKbC/ZZ8\n94/naTk56dPd50cn50l8v6qeKs5zfs/zfLpJ9fmc5xqZiSRJUolX9DqAJEnaclkkJElSMYuEJEkq\nZpGQJEnFLBKSJKmYRUKSJBWzSEiSpGIWCUmSVMwiIUmSilkkJElSsaIiERGnRMTyiHgmIm6MiMPG\nGXtgRFxWj18fER8fY8ybIuKKiHioHnPMGGP+sX6vdbqyJL8kSZoaXReJiDgWOA84EzgEWAIsiogZ\nHRbZCbgXOB14pMOYnYHbgFOA8R7+cRWwGzCrnga6zS9JkqbOtgXLDAIXZeZCgIg4GXgXcCJwbvvg\nzLwFuKUe+8WxVpiZVwNX12NinG0/l5mrCjJLkqRNoKs9EhExDegHrh2dl9XjQ68B5kxttDEdEREr\nI+LOiJgfEa/aDNuUJEkddLtHYgawDbCybf5KYP8pSdTZVcD3geXAPsA5wJURMSfHeBZ6RPw+MBe4\nD3h2E2eTJGlrsgPwGmBRZq4eb2DJoY2xBOOf2/CyZealLS/viIhfUp17cQTwr2MsMhf4zqbMJEnS\nVu544LvjDei2SDwGrKM64bHVTDbeS7FJZebyiHgMmM3YReI+gEsuuYQDDjhgc0ablMHBQebNm9fr\nGGNqaram5gKzlWpqtqbmArOVanK2Jlq6dCkf+tCHoP4sHU9XRSIzX4iIYeAo4Ar47cmRRwEXdp30\nZYiIPYHfp/OVIM8CHHDAAfT19W22XJM1ffr0RuaC5mZr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c86kepnYM8FREjLb2tZnZ00ewR8TZwFVUl4G+kuoEuLcA7+hlrvo8gw3OIYmIp4DV\nmdn+jXuzi4gvAT+i+oB+NfB/qHY7D/UyF9W36Osi4lNUl1UeDvw19UP8eq3ek/RXwMWZub7HcVr9\nCPh0RDwI3EF12GAQ+GZPUwER8Q6qv2l3AftS7T1ZSv0gx82YY6K/rxcAn4mIe4D7gM8DK4Afbs6c\nW6XMdNpME9UH4HqqR6S3Tv/Q41xjZVoHnNCA39k3gV9TnQX+KPAvwJG9ztUh60+B83udo84yRPVH\n8hngAapj1nv1Oled7Wjg/wFPU30ontjrTC3Z3l7/25/d6yxtuXameuLxcqr7HyyjKofbNiDbB4B7\n6n9rD1E98fmVPcgx4d9XqpOOH67/7S1q2v/nLXXyPhKSJKlYY46vSZKkLY9FQpIkFbNISJKkYhYJ\nSZJUzCIhSZKKWSQkSVIxi4QkSSpmkZAkScUsEpIkqZhFQpIkFbNISJKkYv8fkYFxqby8CQUAAAAA\nSUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f2043feac50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "%matplotlib inline\n",
    "k = 10\n",
    "x = range(1, k+1)\n",
    "prob = [float(1)/k] * k\n",
    "plt.scatter(x, prob)\n",
    "plt.xticks(np.arange(min(x), max(x)+1, 1.0))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.2 Continuous variables and Probability Density Functions\n",
    "We describe probability distributions using a **probability density function** (PDF) (denoted by $p$) when working with continuous random variables. $p$ must satisfy the following conditions to be a PDF:\n",
    "- The domain of $p$ should be all the possible states of x.\n",
    "- $\\forall x \\in$ x, $p(x) \\geq 0$ i.e. $p(x)$ can be greater than 1.\n",
    "- $\\int p(x)dx = 1$\n",
    "\n",
    "It's important to understand here that $p(x)$ doesn't give the probability of a specific state. The probability of landing inside an infinitesimal region with volume $\\delta x$ is given by $p(x)\\delta x$. Thus, the probability that $x$ lies in the interval $[a,b]$ is given by: $\\int_{[a,b]} p(x)dx$. The diagram below better illustrates this.\n",
    "![pdf](http://slideplayer.com/slide/8387312/26/images/12/The+Probability+Density+Function.jpg)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For example, consider a uniform distribution on an interval of real numbers. This is denoted by: $ x \\sim U(a, b) $ <br>\n",
    "The corresponding function $u(x; a,b)$ (\";\" denoting \"parameterized by\") is given by:\n",
    "\n",
    "$$ \n",
    "\\\\ \n",
    "u(x; a,b) = \n",
    "     \\begin{cases}\n",
    "       \\frac{1}{b-a} &\\quad \\text{for } x \\in [a, b]\\\\\n",
    "       0 &\\quad otherwise\n",
    "     \\end{cases}\n",
    "\\\\\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAg0AAAFkCAYAAACjCwibAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAHItJREFUeJzt3XuUZWV95vHv04CXlliY9HBREhwvAYwJ0iU6jJeMECUX\noxIzgxVcGklUEkxIkURHEmyD48TAAhxMegbHjHRLLBdmjMJaJJ2AmTGKDbFKYBm7iY6NgJcGBMto\n46W7f/PHPk2Koqr6Pae7OFXF97NWreK8e7/v+e3VdJ/nvPvde6eqkCRJ2ptVwy5AkiQtD4YGSZLU\nxNAgSZKaGBokSVITQ4MkSWpiaJAkSU0MDZIkqYmhQZIkNTE0SJKkJoYGSZLUZKDQkOSsJNuS3J9k\nc5ITFtj3tUl2J9nV+707yY5Z+6xLsiXJt5Pcm+TvkjxnkNokSdLi6Ds0JDkNuAhYBxwP3AxsSrJm\ngW7TwOEzfo6atf1W4CzgmcDzgNuAv03yI/3WJ0mSFkf6fWBVks3ADVV1du91gDuAS6vqgjn2fy1w\nS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ain": [
       "<matplotlib.figure.Figure at 0x7f203bc03750>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "a = 2\n",
    "b = 4\n",
    "\n",
    "value = float(2) / 4\n",
    "x = [a, b]\n",
    "y = [value, value]\n",
    "plt.plot(x, y)\n",
    "plt.xticks(range(10))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4. Marginal Probability\n",
    "\n",
    "Sometimes we know the probability distribution over a set of variables and need to find the probability over just a subset of them. The probability over the subset is called **marginal probability distribution**.\n",
    "\n",
    "For example, if we know $P(\\text{x}, \\text{y})$, we can find $P(\\text{x})$ as:\n",
    "$$ \\forall x \\in \\text{x}, P(\\text{x} = x) = \\sum_{y} P(\\text{x} = x, \\text{y} = y)$$\n",
    "\n",
    "This image better illustrates how we calculate marginal probabilities: <br> <br>\n",
    "![marginal pdf](http://www.statisticshowto.com/wp-content/uploads/2014/02/conditional-distribution-3.jpg)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 5.  Conditional Probability\n",
    "\n",
    "This is one of the most important concept in probability theory. Sometimes we are interested in calculating the probability of some event (X) , \"conditioned\" on the knowledge that another event (Y) has happened. It is denoted by $P(X \\hspace{.1cm}| \\hspace{.1cm} Y)$. For example, at the beginning of a class, the probability that a student will score well on a subject is the same for all the students. But if we are given that a particular student does well on most of his subjects, then the probability that the student will score well, given that the student scores well on most of his subjects, increases. It can be computed by the formula:\n",
    "\n",
    "$$ P(\\text{y} = y \\hspace{.1cm}| \\hspace{.1cm} \\text{x} = x) = \\frac{P(\\text{y} = y , \\text{x} = x)}{P(\\text{x} = x)} $$\n",
    "\n",
    "The conditional probability is defined only when $P(\\text{x} = x) > 0$ as we can't condition on an event that never occurs."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 6. The Chain Rule of Conditional Probabilities\n",
    "\n",
    "Any joint probability distribution over many random variables may be decomposed into conditional distributions over only one variable. Let's take a simple example before we look at the general expression. From the definition of conditional probability, we have: $ P(\\text{b}, \\text{c}) = P(\\text{b} \\hspace{.1cm} | \\hspace{.1cm} \\text{c}) P(\\text{c}) $. <br>\n",
    "We want to decompose $P(\\text{a}, \\text{b}, \\text{c})$. Applying the formula for conditional probability to $P(\\text{a}, \\text{b}, \\text{c})$, we get:\n",
    "\n",
    "$$ P(\\text{a}, \\text{b}, \\text{c}) = P(\\text{a} \\hspace{.1cm} | \\hspace{.1cm} \\text{b}, \\text{c})P(\\text{b}, \\text{c}) $$\n",
    "$$\\Rightarrow P(\\text{a}, \\text{b}, \\text{c}) = P(\\text{a} \\hspace{.1cm} | \\hspace{.1cm} \\text{b}, \\text{c})P(\\text{b} \\hspace{.1cm} | \\hspace{.1cm} \\text{c}) P(\\text{c})\n",
    "$$\n",
    "\n",
    "The general expression is given by:\n",
    "$$P(\\text{x}^{(1)}, ..., \\text{x}^{(n)}) = P(\\text{x}^{(1)}) \\prod_{i=2}^{n} P(\\text{x}^{(i)} \\hspace{.1cm} | \\hspace{.1cm} \\text{x}^{(1)},..., \\text{x}^{(i-1)}) $$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 7. Independence and Conditional Independence\n",
    "Two random variables x & y are said to be **independent** (x $\\perp$ y) if they satisfy: <br> <br>\n",
    "$$ \\forall x \\in \\text{x}, y \\in \\text{y}, P(\\text{x} = x, \\text{y} = y) = P(\\text{x} = x)P(\\text{y} = y) $$\n",
    "\n",
    "Using the definition of conditional probability, this implies: <br> <br>\n",
    "$$ P(\\text{x} = x, \\text{y} = y) = P(\\text{x} = x \\hspace{.1cm} | \\hspace{.1cm}  \\text{y} = y)P(\\text{y} = y)=  P(\\text{x} = x)P(\\text{y} = y)$$\n",
    "$$ \\Rightarrow P(\\text{x} = x \\hspace{.1cm} | \\hspace{.1cm}  \\text{y} = y)=  P(\\text{x} = x)$$\n",
    "<br>\n",
    "Similarly, $P(\\text{y} = y \\hspace{.1cm} | \\hspace{.1cm}  \\text{x} = x)=  P(\\text{y} = y)$. However, this scenario rarely occurs. The more commonly observed phenomenun is that of **conditional independence**. Two random variables x & y are said to be conditional independent (x $\\perp$ y | z) given a random variable z if: <br> <br>\n",
    "$$ \\forall x \\in \\text{x}, y \\in \\text{y}, \\forall z \\in \\text{z}, P(\\text{x} = x, \\text{y} = y \\hspace{.1cm} | \\hspace{.1cm}  \\text{z} = z) = P(\\text{x} = x \\hspace{.1cm} | \\hspace{.1cm} \\text{z} = z)P(\\text{y} = y \\hspace{.1cm} | \\hspace{.1cm} \\text{z} = z) $$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 8. Expectation, Variance and Covariance\n",
    "\n",
    "The **expectation**, or **expected value**, of some function $f(x)$ with respect to a probability distribution $P(x)$ is the average, or mean value, that the function $f$ takes on, when $x$ is drawn from $P$. For discrete variables this can be computed with a summation: <br> <br>\n",
    "$$ \\mathbb{E}_{x \\sim P}[f(x)] = \\sum_{x} P(x)f(x) $$ \n",
    "\n",
    "For continuous variables, it is computed with an integral:\n",
    "$$ \\mathbb{E}_{x \\sim p}[f(x)] = \\int p(x)f(x) $$\n",
    "\n",
    "The expectation of $f(x)$ is simply represented as $\\mathbb{E}[f(x)]$. Expectations are linear: <br> <br>\n",
    "$$ \\mathbb{E}_{x}[\\alpha f(x) + \\beta g(x)] = \\alpha \\mathbb{E}_{x}[f(x)] + \\beta \\mathbb{E}_{x}[g(x)]$$\n",
    "\n",
    "**Variance** gives a measure of how much the values of random variable x vary (denoted by $\\sigma$). It is given by: <br> <br>\n",
    "$$ Var(f(x)) = \\mathbb{E}[(f(x) - \\mathbb{E}[f(x)])^2] $$\n",
    "\n",
    "The image below shows how the probability distribution of a Gaussian (explained later) varies with the variance. Lower the variance, more peakier the distribution. The square root of variance is called **standard deviation**.\n",
    "![variance](https://qph.ec.quoracdn.net/main-qimg-08986ffaf7525f799a2bded927ccb86e)\n",
    "\n",
    "**Correlation** measures how two variables are linearly related. **Covariance** additionally measures the scale of the variables as well. High values of correlation indicate that the variables are far from their respective means. A positive values indicate that both the variables tend to take high values simultaneously, whereas a negative value indicates that when one of the variables takes a high value, the other one tends to take a lower value. Covariance is given by:  <br> <br>\n",
    "$$ Cov(f(x), g(y)) = \\mathbb{E}[(f(x) - \\mathbb{E}[f(x)])(g(y) - \\mathbb{E}[g(y)])] $$\n",
    "\n",
    "Covariance and independence and related but distinct concepts. Independence implies zero covariance, but zero covariance doesn't necessarily imply independence. Hence, independence is a stronger condition. \n",
    "\n",
    "**Covariance matrix** of a random vector $\\boldsymbol{x} \\in \\mathbb{R} ^{n}$ is an $n$ x $n$ matrix denoted by $\\Sigma$, such that:\n",
    "$$ Cov(x)_{i, j} = Cov(x_i, x_j), i \\neq j$$\n",
    "$$ Cov(x)_{i, i} = Var(x_i)$$\n",
    "![cov matrix](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS6BwYwUXKlhcgBdq8hwYybgFuBqMgLSxqCSwUDBaEXMoXm0ryS)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 9. Common Probability Distributions\n",
    "\n",
    "#### 9.1 Bernoulli Distribution\n",
    "The Bernoulli distribution is a distribution over a single binary random variable. It is controlled by a single parameter $\\phi \\in [0,1]$, which gives the probability of the random variable being equal to 1. For e.g., in the event of tossing a coin, $p$ represents the probability that a heads shows up (Assuming heads is represented by 1). <br>\n",
    "**Properties**:\n",
    "- $P (x = 1) = \\phi $ <br>\n",
    "- $P (x = 0) = 1 − φ$ <br>\n",
    "- $P (\\text{x} = x) = \\phi^x(1 − \\phi)^{1−x}$ <br>\n",
    "- $E_x[x] = \\phi$ <br>\n",
    "- $Var_x(x) = \\phi(1 − \\phi)$ \n",
    "\n",
    "#### 9.2 Multinoulli Distribution\n",
    "The Multinoulli distribution is similar to the Bernoulli distribution, with the difference being that the discrete random variable can have k different states. It is parameterized by a vector $\\boldsymbol{p} \\in [0,1] ^{k-1}$, where $p_i$ indicates the probability of the $i^{th}$ state. The final $k^{th}$ state is given by $(1 - \\boldsymbol{1}^T \\boldsymbol{p})$ where $\\boldsymbol{1}^T \\boldsymbol{p} \\leq 1$.  <br>\n",
    "\n",
    "#### 9.3 Gaussian Distribution \n",
    "\n",
    "The most widely used distribution over real numbers is the **normal** or **gaussian distribution**: <br> <br>\n",
    "$$ \\mathcal{N}(x; \\mu, \\sigma) = \\sqrt{\\frac{1}{2 \\pi \\sigma^2}} exp(-\\frac{1}{2\\sigma^2}(x-\\mu)^2)$$\n",
    "\n",
    "where $\\mu$ is the mean (or peak value) of the distribution and $\\sigma^2$ denotes the variance. Feel free to play around with the values of *variance* and *mu* in the snippet below to see how the parameters effect the distribution. \n",
    "![gaussian](images/gaussian.jpg)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhQAAAFkCAYAAAB4sKK5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3Xm81mP+x/HXp0WpVLYkRgxZsqSyhbHFNIaxb4dkLBVC\nTqWSUoqapBBStpIl+5I1wlgmWSrbjDAmopSypJS0XL8/Pnc/p+Ns933uc657eT8fj/uR872/9/e8\nL/dZPuf6XouFEBARERGpjBqxA4iIiEj2U0EhIiIilaaCQkRERCpNBYWIiIhUmgoKERERqTQVFCIi\nIlJpKihERESk0lRQiIiISKWpoBAREZFKU0EhIiIilZZSQWFm3cxsjpmtMLPpZrZ3BV93mpmtNbPH\nSnhusJnNN7PlZvaime2QSjYRERGpfkkXFGZ2KjASGAi0Bt4HppjZZuW8rjkwAnithOf6ABcBXYF9\ngJ8T19wg2XwiIiJS/SzZzcHMbDrwVgihe+JjA74CRocQri3lNTWAV4G7gIOARiGEE4o8Px8YEUK4\nPvFxQ2AhcFYI4aGkWyU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B3z66BZFHnWLnHN3\nVXx/Rm98Bf8HnYV3PRZ9rAXWFDmneeL4QUWO1cHn4y4GlgIPA01it6ecto4voa3F27UG6JT477rA\n83iX1S94V/ut637gZeoj2XYWOTYIH6y4HB+FvEPstpTTzsbAvXjR9AM+z7tekefX+7rFN9f7J7Ao\n0d9fG4YAAADOSURBVMZPEj/kGsRuSwltuxD4Av+F+ybrF/MvA3cVO/9EvEhcgfcydYjdhnS3E9+N\neU7i3PnAU8AesdtQgTYevO5narHHXYnnx1OsqE28ZkairZ8BZ8ZuR7rbiQ+q/QwvChfhM34OipE9\niTaW1L71fpZW1fenNgcTERGRSsvmdShEREQkQ6igEBERkUpTQSEiIiKVpoJCREREKk0FhYiIiFSa\nCgoRERGpNBUUIiIiUmkqKERERKTSVFCIiIhIpamgEBERkUpTQSEiIiKV9n/a5h9rcwRAXgAAAABJ\nRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6c46176d90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "import matplotlib.mlab as mlab\n",
    "\n",
    "mu = 0.0   # mean of the distribution\n",
    "variance = 1  # standard deviation\n",
    "\n",
    "sigma = np.sqrt(variance)\n",
    "x = np.linspace(mu - 2*sigma, mu + 2*sigma, 100)\n",
    "plt.plot(x,mlab.normpdf(x, mu, sigma))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the absence of any prior knowledge about the distribution, the normal distribution is a good choice, owing to the **central limit theorem** (which states that the sum of many indepedent random variables is approximately normally distributed) and the fact that the normal distribution encodes the most uncertainty over the real numbers among all other probability distributions with the same variance.\n",
    "\n",
    "Generalizing to $\\mathbb{R}^n$, the mean $\\boldsymbol{\\mu}$ becomes a vector and the variance is replaced by the covariance matrix $\\boldsymbol{\\Sigma}$, which is often fixed to be a diagonal matrix. \n",
    "![normal multivariate](https://i.stack.imgur.com/EOyQI.png)\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 9.4 Exponential and Laplace distributions\n",
    "\n",
    "To place a sharp peak at x = 0, we can use the **exponential distribution**:\n",
    "$$ p(x; \\lambda) = \\lambda \\hspace{.05cm} exp(-\\lambda x), \\forall x \\geq 0$$\n",
    "\n",
    "Thus, the probability for $x < 0$ is 0. A similar function that allows to place a peak at x = $\\mu$ is the **Laplace distribution**: <br> <br>\n",
    "$$p(x; \\mu, \\gamma) = \\frac{1}{2 \\gamma} \\hspace{.05cm} exp(-\\frac{|x-\\mu|}{\\gamma})$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 9.5 The Dirac Distribution and Empirical Distribution\n",
    "\n",
    "The Dirac delta function is defined such that it is zero everywhere except 0, where its value is 1.\n",
    "$$ \n",
    "\\\\ \n",
    "\\delta(x) = \n",
    "     \\begin{cases}\n",
    "       1 &\\quad x = 0\\\\\n",
    "       0 &\\quad otherwise\n",
    "     \\end{cases}\n",
    "\\\\\n",
    "$$\n",
    "\n",
    "It can be visualized as a gaussian distribution with mean and variance as 0. \n",
    "![dirac delta](http://www.chebfun.org/examples/complex/img/Hyperfuns_01.png)\n",
    "\n",
    "Suppose we want to define a probability distribution with all the masss centered on one value (say $\\mu$), we can define $p(x)$ as:\n",
    "$$ p(x) = \\delta (x-\\mu)$$\n",
    "\n",
    "A common use of the Dirac delta distribution is as a component of an **empirical distribution**:\n",
    "$$ \\hat{p}(\\boldsymbol{x}) = \\frac{1}{m}\\sum_{i=1}^{m} \\delta(\\boldsymbol{x} - \\boldsymbol{x}^{(i)}) $$\n",
    "\n",
    "This assigns a probability mass of 1/m to each of the m points $\\boldsymbol{x}^{(i)}, i=1, 2, ... m$. This is because putting $\\boldsymbol{x} = \\boldsymbol{x}^{(i)}$ in the above equation will result in only one non-zero term."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "####  9.6 Mixtures of distributions\n",
    "\n",
    "We can define probability distributions by combining other simpler probability distributions. One such way is to construct a **mixture distribution**. On each trial, the choice of which component distribution should generate the sample is determined by sampling a component identity from a multinoulli distribution:\n",
    "\n",
    "$$ P(x) = \\sum_{i} P(c = i) P (x \\hspace{.1cm} | \\hspace{.1cm} c = i) $$\n",
    "\n",
    "where $P (c)$ is the multinoulli distribution over component identities. An important concept introduced here is that of a **latent variable**, which is a random variable that we cannot observe directly. In the given case, $c$ is a latent variable. The distribution $P (x \\hspace{.1cm} | \\hspace{.1cm} c = i) $, relating the latent variable to the visible variable, determines the shape of the distribution $P(x)$, even thoughit is possible to describe $P(x)$ without reference to the latent variable.\n",
    "\n",
    "A very powerful type of mixture model is the **Gaussian Mixture model (GMM)**, where each of the component distributions is a gaussian, with a **prior probability** associated with each gaussian. The word “prior” indicates that it expresses the model’s beliefs about $c$ *before* it has observed $x$. <br>\n",
    "$P(c \\hspace{.1cm} | \\hspace{.1cm} x)$ is a **posterior probability**, because it is computed *after* observation of x. A Gaussian mixture model is a **universal approximator** of densities, in the sense that any smooth density can be approximated with any speciﬁc non-zero amount of error by a Gaussian mixture model with enough components."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 10. Useful properties of Common Functions\n",
    "\n",
    "Certain functions arise often while working with the probability distributions used in deep learning models, one such being the **logistic sigmoid**, given by:\n",
    "$$ \\sigma(x) = \\frac{1}{1 + exp(-x)} $$\n",
    "\n",
    "It produces a value in the range [0, 1] and thus, often used in the last layer of a deep learning model, (e.g. in classification), to squash the final output values so that they represent a probability of a class, given the input. The function saturates when its argument is either too positive or too negative."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Another commonly used function is the **softplus function**:\n",
    "\n",
    "$$ \\varsigma(x) = log(1+exp(x)) $$\n",
    "\n",
    "It is useful for producing $\\sigma$ of a normal distribution as its range is $(0, \\infty)$. It is named so because it is smoothened (or \"softened) version of: $ x^+ = max(0, x) $"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "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x/g3KDCO4D3\ncrofR8cQZA5oKQVUAYKNMXUzn9qZeU5rEe43/k8zL6moAPwbGGutTXeiZsk5Y0wj3P8glwHJuMcQ\njAI+tdYmOVmb5IhuUhZAjDFvAHOBPcD1wD+BM0Cck3VJzhhjwnAfzTGZTdUy3zOPWmt/BcYALxtj\ndgK7cb9X7gNm57gPJy87NMb8F+iVzVNNrbVfZ65TGfc8Bffhvq5yPPCitdaVR2XKNTLG1Afexz0I\nrTCwC/enkdEKdP7BGPNX4G/8eZOygdbadc5WJdfCGBMH3AOUBn4HVgIvWWt3OVqY5Igx5l7cH64u\nfNOeYK3tl7nOP4DHgBLA/4AB1tqdOe7DF+YhEBEREWf5+jwEIiIikgcUCERERESBQERERBQIRERE\nBAUCERERQYFAREREUCAQERERFAhEREQEBQIRERFBgUBERERQIBARERHg/wMGfSntlEBwVwAAAABJ\nRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6c46195ad0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "def sigmoid(x):\n",
    "    return 1 / (1 + np.exp(-x))\n",
    "\n",
    "def softplus(x):\n",
    "    return np.log(1 + np.exp(x))\n",
    "\n",
    "def plot(x, func, label):\n",
    "    y = func(x)\n",
    "    plt.plot(x, y, label=label)\n",
    "    \n",
    "x = np.linspace(-10, 10, 100)\n",
    "plot(x, sigmoid, label='sigmoid')\n",
    "plot(x, softplus, label='softplus')\n",
    "plt.legend(loc='best')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Some useful properties:\n",
    "![properties](images/properties.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 11. Bayes' Rule\n",
    "\n",
    "A lot of times, we actually have $P(y \\hspace{.1cm} | \\hspace{.1cm} x)$ and we need to find $P(x \\hspace{.1cm} | \\hspace{.1cm} y)$. **Bayes' Rule** helps us to compute that quantity:\n",
    "\n",
    "$$ P(x \\hspace{.1cm} | \\hspace{.1cm} y) = \\frac{P(x)P(y \\hspace{.1cm} | \\hspace{.1cm} x)}{P(y)} $$\n",
    "\n",
    "where $P(y) = \\sum_x P(x)P(y \\hspace{.1cm}  | \\hspace{.1cm} x)$. Bayes' Rule is one of most important concepts in probability theory."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 12. Technical Details of Continuous Variables\n",
    "\n",
    "A proper formal understanding of continuous random variables and probability density functions requires developing probability theory in terms of a branch of mathematics known as **measure theory**. Measure theory is more useful for describing theorems that apply to most points in $\\mathbb{R}^n$ but do not apply to some corner cases. The book describes the following three concepts:\n",
    "- **measure zero**: Measure theory provides a way to describe that a set of points is negligibly small. Such a set is said to have measure zero. For e.g., in the space of $\\mathbb{R}^2$, a line has measure zero, whereas a polygon has positive measure. An individual point also has a measure zero. The union of countably many sets each having measure zero, also has a measure zero.\n",
    "\n",
    "- **almost everywhere**: A property that holds almost everywhere holds throughout all space except for on a set of measure zero. Some results that hold for all discrete values, hold \"almost everywhere\" only for continuous values.\n",
    "\n",
    "- Handling continuous functions that are **deterministic functions** of one another. Let $\\boldsymbol{y} = g(\\boldsymbol{x})$. It may be natural to think $p_y(\\boldsymbol{y}) = p_x(g^{-1}(\\boldsymbol{y}))$. However, this is not true. E.g. $y = x/2$ where $x$ follows the uniform distribution $U(0, 1)$. Now, assigning $p_y(\\boldsymbol{y}) = p_x(2y)$ would mean that $p_y$ would be $0$ everywhere except [0, 1/2]. Thus, we get:\n",
    "$$ \\int p_y(y)dy = \\frac{1}{2}$$\n",
    "This violates the probability distribution. The reason for this is that the transformation $g$ distorts the space, which is not accounted for, above. The probability in a volume of $\\delta x$ is given by $p_x(x)\\delta x$. Taking a small volume in the $\\boldsymbol{y}$ space, the probalility would be $p_y(y)\\delta y$. Thus: <br> <br>\n",
    "$$ |p_y(y)\\delta y| = |p_x(x)\\delta x| $$\n",
    "$$ \\Rightarrow p_x(x) = p_y(y) \\hspace{.1cm} |\\frac{\\partial g(x)}{\\partial x}|$$\n",
    "In higher dimensions, the derivative generalizes to the derivative of the Jacobian Matrix, $J_{i,j} = \\frac{\\partial x_i}{\\partial y_j}$."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 13. Information Theory\n",
    "\n",
    "**Information theory** is a branch of applied mathematics that revolves around quantifying how much information is present in a signal. It was originally invented to study sending messages from discrete alphabets over a noisy channel, such as communication via radio transmission.\n",
    "\n",
    "To give a flavour, given below is what is known as the **Binary Symmetric Channel (BSC)**:\n",
    "![bsc](https://i.stack.imgur.com/ipht5.gif)\n",
    "\n",
    "It is named so, because both the input and output can be either $0/1$. $p$ represents the probability that given that we transmitted $0$ (or $1$), we received an error, i.e. $1$ (or $0$ in case $1$ was sent). So, the probability of error in transmission is $p$. Here, we used one bit to represent one message, but we could use another coding scheme where $0$ is represented by $00$ and $1$ is represented by $11$. The advantage here is that the probability of error in transmission reduces in this case, but at the cost of increased number of transmissions. In this case, we are representing $1$ message using $2$ bits. Thus, the rate of the code is $1/2$. Information theory deals with the design of optimal **codes**, that can maximize this rate of transmission.\n",
    "\n",
    "The basic intuition behind information theory is that learning that an **unlikely** event has occurred is more informative than learning that a likely event has occurred. A message saying “the sun rose this morning” doesn't give any valuable information but a message saying “there was a solar eclipse this morning” is very informative. Thus, information needs to be quantified in a way that high probability events should have lower information, and low probability events should have higher. Also, independent events should have additive information. For example, ﬁnding out that a tossed coin has come up as heads twice should convey twice as much information as ﬁnding out that a tossed coin has come up as heads once.\n",
    "\n",
    "The **self-information** of an event x = $x$ satisfies all the above mentioned properties: <br> <br>\n",
    "$$ I(x) = - \\text{log} P(x)$$\n",
    "\n",
    "The information in an entire probability distribution is quantified using the **Shannon Entropy**. Nearly deterministic events have low entropy and those closer to uniform, have higher. The logarithm here refers to the natural log with base $e$. It is given by: <br> <br>\n",
    "$$ H(x) = \\mathbb{E}_{x \\sim P}[I(x)] = - \\mathbb{E}_{x \\sim P}[\\text{log} P(x)]$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f072482cfd0>]"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgsAAAFkCAYAAACuFXjcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3Xl4lNX5xvHvQwggiJGKgHXBHVBQSMSwWLUgilqoO0YR\nFRXFtVTcawF3pbiLqLQiolHcQasouGBVAiaIG1R+KoKoCJbGBZDt/P44kxIgCZnJzJxZ7s91zYV5\n8868Ny8x88xZzTmHiIiISHXqhQ4gIiIiqU3FgoiIiNRIxYKIiIjUSMWCiIiI1EjFgoiIiNRIxYKI\niIjUSMWCiIiI1EjFgoiIiNRIxYKIiIjUSMWCiIiI1CimYsHMLjCzL81spZnNMLPONZz7hpmtr+Ix\nOfbYIiIikixRFwtm1g8YBQwDOgFzgClm1ryapxwLtKr0aA+sAybGElhERESSy6LdSMrMZgAlzrlL\nIl8bsAi42zl3Wy2e/ydgOLCDc25l1IlFREQkqaJqWTCzXKAAmFZxzPlqYyrQtZYvMxAoVqEgIiKS\nHupHeX5zIAdYssnxJUCbLT3ZzA4E9gXO3MJ52wFHAAuAVVFmFBERyWaNgF2BKc65H+LxgtEWC9Ux\noDb9GWcBHzvnSrdw3hHAY3VOJSIikr1OBR6PxwtFWywsww9ObLnJ8RZs3tqwETPbCugH/KUW11kA\nMGHCBNq1axdlRInVkCFDuOOOO0LHyCq658mne558uufJNXfuXPr37w+R99J4iKpYcM6tMbNSoCcw\nCf43wLEncPcWnt4PaEDtWgxWAbRr1478/PxoIkod5OXl6X4nWSrfc+egvNw/aqNpU9h2W6iX4qu3\npPI9z1S658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qvedmdihwNb4LaCawJ3C3mX3rnNM9Tx6L\n/Fnr99FkFwvJ2ohKNojlngNgZkOBy4GezrlPEhMvI0V7z/cAWgOTI5+2IDL42MxWA22cc18mKGum\niOXn/FtgdaRQqDAXaGVm9Z1za6t5nnix3PPrgPGVuto+iRTLD6ACLVGqew/9MZoPgEntm3POrQFK\ngZ4VxyK/HHtS/Taa71U+P6JX5LhsQYz3HDO7DLgGv5T37ETnzCQx3PO5QAf8bJ/9I49JwOuR/16U\n4MhpL8af83fwn2wrawN8q0Jhy2K8543xg/IqWx95qlVxvtRdVe+hhxPte2iA0ZsnASuBAfipMw8A\nPwDbR74/Hrip0vldgdXAn/H/Iw/Hb1u9T+iRqOnyiOGeXx65x8fiK9KKR5PQf5d0eUR7z6t4vmZD\nJPie4/exKcdPJdsLOBr/KezK0H+XdHnEcM+HAf/FT5fcFf/Bbz7weOi/S7o88APO98d/uFgP/Cny\n9c6R798MPFLp/F2Bn/Fjz9oA50feUw+L5rpJH7PgtBFV0kV7z4HB+NkPT2/yUiMiryFbEMM9lzqK\n4XfL12Z2OHAHfn2AxZH/vi2pwdNYDD/n1+Pf4K4HdgSW4lvR/pK00OnvAOAN/HgDh1/nAuAR/LoV\nrYCdK052zi0ws6PxO0ZfjJ/aepZzLqoB69pISkRERGqk+cQiIiJSIxULIiIiUiMVCyIiIlIjFQsi\nIiJSIxULIiIiUiMVCyIiIlIjFQsiIiJSIxULIiIiUiMVCyIiIlIjFQsiIiJSIxULIiIiUqP/B0sp\n+Iu8voYxAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f0724821ad0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# For the case of a binary random variable, let p \n",
    "# represent the probability of the value being 1. Then,\n",
    "# H(x) = -(P(0)logP(0) + P(1)log(P(1)))\n",
    "# or H(x) = -(plog(p) + (1-p)log(1-p))\n",
    "\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "def entropy(p):\n",
    "    return -(p*np.log(p) + (1-p)*np.log(1-p))\n",
    "\n",
    "p_values = np.linspace(1e-7, 1 - 1e-7)\n",
    "entropy_values = entropy(p_values)\n",
    "plt.plot(p_values, entropy_values)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now, given any data, we never know what is the true underlying distribution (lets call this $P(x)$). Suppose, we assume the underlying distribution to be $Q(x)$ and use a code to maximize the rate of transmission accordingly. We can measure how different the two distributions are, using the **Kullback-Leibler (KL) divergence**:\n",
    "$$ D_{KL}(P||Q) = \\mathbb{E}_{x\\sim P} [log\\frac{P(x)}{Q(x)}] = \\mathbb{E}_{x\\sim P} [log P(x) - log Q(x)]$$\n",
    "\n",
    "The KL divergence has some properties of a distance metric:\n",
    "- $D_{KL}(P||Q) \\geq 0$\n",
    "- $D_{KL}(P||Q) = 0$ only if $P$ and $Q$ are the same distribution in the case of discrete variables, or equal \"almost everywhere\" for continous variables.\n",
    "\n",
    "However, it isn't a true distance metric as it is not symmetric, i.e., $D_{KL}(P||Q) \\neq D_{KL}(Q||P)$. Thus, choosing which quantity to minimize is an important choice to make.\n",
    "\n",
    "Another similar quantity is the **cross-entropy**: $H(P, Q) = H(P) + D_{KL}(P||Q)$. <br> <br>\n",
    "$$ H(P, Q) = -\\mathbb{E}_{x\\sim P} [log{Q(x)}] $$ \n",
    "\n",
    "Since $Q$ doesn't participate in the omitted term, minimizing cross-entropy gives the same result as minimizing the KL divergence. Minimizing the KL divergence is not computationally feasible, and hence, we go for minimizing the cross-entropy."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 14. Structured Probabilistic Models\n",
    "\n",
    "Machine learning algorithms often involve probability distributions over a very large number of random variables. Often, these probability distributions involve direct interactions between relatively few variables. Suppose, we have 3 variables $a$, $b$ and $c$, such that $a$ can have 3 values, $b$ can have 2 and $c$ 4. Also, $a$ influences the value of $b$ which, in turn, influences the value of $c$. But given $b$, $a$ and $c$ are independent. Thus, if we wanted to use a single function to represent the joint distribution of $a$, $b$ and $c$:\n",
    "$$ P(a, b, c) = P(a)P(b | a)P(c | a,b)$$ \n",
    "\n",
    "which we get using the chain rule. Here, we are doing unnecessary computations because since $c$ is independent of $a$ given $b$, $P(c | a,b) = P(c | b)$. So, instead of computing at $3$ (# values of a) x $2$ (# values of b) cases, we just need to compute $2$ cases. Thus, it is better to factorize a probability distribution to reduce the number of parameters. Thus:\n",
    "$$ P(a, b, c) = P(a)P(b | a)P(c | b)$$ \n",
    "\n",
    "These kinds of factorizations can be described using **graphs**, where a variable represents a node of the graph, and vertices are connected to each other via edges. Such a representation of the factorization of a probability distribution is called a **Structured Probabilistic model** or **graphical model**. There are two kinds of graphical models:\n",
    "- Directed (directed edges)\n",
    "- Undirected (undirected edges)\n",
    "\n",
    "**Directed** models represent the factorization into probability distribution (like the one above), where there is a flow of influence between nodes. Directed models contain one factor for each of the variables and the factor consists of a conditional probability distribution over the factor, given its parents (denoted by $Pa_{\\mathcal{G}}$):\n",
    "$$ p(\\boldsymbol{x}) = \\prod_{i} p(x_i \\hspace{.1cm} | \\hspace{.1cm} Pa_{\\mathcal{G}}(x_i)) $$\n",
    "![directed-pgm](images/directed-pgm.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Undirected models** use graphs with undirected edges, and they represent factorizations into a set of functions, usually **not** probability distributions of any kind, i.e. there is no constraint that the factor must sum to 1, but must be non-negative. Any set of nodes that are all connected to each other in $\\mathcal{G}$ is called a clique. Each clique $C^{(i)}$ in an undirectedmodel is associated with a factor $\\phi^{(i)}(C^{(i)})$.\n",
    "\n",
    "The probability of a conﬁguration of random variables is proportional to the product of all these factors. To obtain the actual probabilities, we divide by a normalizing constant Z, deﬁned to be the sum or integral over all states of the product of the $\\phi$ functions.\n",
    "$$ p(\\boldsymbol{x}) = \\frac{1}{Z}\\prod_{i} \\phi^{(i)}(C^{(i)}) $$\n",
    "![undirected-pgm](images/undirected-pgm.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
